import { request } from "../utils";
// 获取频道列表信息
export const getChannelApi = () => request.get("/channels");
// 提交文章表单
export const createArticleApi = (data) =>
  request.post("/mp/articles?draft=false", data);
// 获取文章列表
export const getArticlesApi = (req) =>
  request.get("/mp/articles", {
    params: {
      ...req,
    },
  });
// 删除文章
export const delArticleApi = (id) => request.delete(`/mp/articles/${id}`);
// 获取文章详情
export const getArticleDetailApi = (id) => request.get(`/mp/articles/${id}`);
